<?php
/**
 * Created by PhpStorm.
 * User: kcj
 * Date: 2017/3/7
 * Time: 17:42
 */

namespace app\index\controller;

use think\worker\Server;

class Worker extends Server{
    protected $socket='http://0.0.0.0.2346';

    public function onMessage($connection,$data)
    {
        $connection->send(json_encode($data));
    }
}